package com.star.starp.utils;

import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;


public class JwtUtils {
    //生成令牌,msg令牌携带的数据
    public static String createToken(String msg){
        return Jwts.builder().
                signWith(SignatureAlgorithm.HS256,"studyquestion_"+System.currentTimeMillis()).
                setSubject(msg).compact();
    }

    public static void main(String[] args) {
        System.err.println(createToken("测试"));
    }
// 生成密钥
//    private static Key createKey(){
//        return null;
//    }
}
